package cn.book.zen_of_dp.strategy;

/**
 * @Auther: Huanyu Lee
 * @Date: 2022/3/3  16:32
 * @Description: 锦囊 封装类，承载 3个策略
 */
public class Context {
    private final IStrategy strategy;
    // 构造函数，你要使用哪个妙计
    public Context(IStrategy strategy) {
        this.strategy = strategy;
    }
    // 使用计谋，看我出招了
    public void operate(){
        this.strategy.operate();
    }
}
